<?php
define('BASE_PATH', realpath(dirname(__FILE__) . '/../'));
define('APPLICATION_PATH', BASE_PATH . '/application/');

// Include path
set_include_path(
    APPLICATION_PATH . 'library'. PATH_SEPARATOR .
    get_include_path()
);

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV',
              (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV')
                                         : 'production'));


// Zend_Application
require_once 'Zend/Application.php';


$obj_application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . 'config/config.xml'
);

$obj_application->getAutoloader()->setFallbackAutoloader(true);

$obj_application->bootstrap();
$obj_application->run();